<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h2>{{message}}</h2>
    <!-- 1.在遍历的过程中，没有使用所引致（下标值）-->
    <ul>
        <li v-for="name in names">{{name}}</li>
    </ul>

    <!-- 2.在遍历的过程中，获取索引值-->
    <ul>
        <li v-for="(name, index) in names">{{index + 1}}.{{name}}</li>
    </ul>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            message: 'simplelu',
            names: ['kai', 'lu', 'simplelu']
        }
    })
</script>
</body>
</html>